package com.wdf.dota;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;

import net.tsz.afinal.FinalHttp;
import net.tsz.afinal.http.AjaxCallBack;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.Drawable;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.os.Environment;
import android.os.Parcelable;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v4.view.ViewPager.OnPageChangeListener;
import android.util.Log;
import android.view.View;
import android.view.animation.AnimationSet;
import android.view.animation.TranslateAnimation;
import android.widget.Button;
import android.widget.HorizontalScrollView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.RadioGroup.OnCheckedChangeListener;
import android.widget.Toast;

import com.wdf.bean.Dota2HeroSkill;
import com.wdf.bean.DotaHeros;
import com.wdf.helper.ConfigInfo;

public class Dota2HeroMenuActivity extends Activity implements
		OnCheckedChangeListener {
	private RadioGroup mRadioGroup;
	private RadioButton mRadioButton1;
	private RadioButton mRadioButton2;
	private RadioButton mRadioButton3;

	private float mCurrentCheckedRadioLeft;// 当前被选中的RadioButton距离左侧的距离
	private HorizontalScrollView mHorizontalScrollView;// 上面的水平滚动控件
	private ViewPager mViewPager; // 下方的可横向拖动的控件
	private ArrayList<View> mViews;// 用来存放下方滚动的layout(layout_1,layout_2,layout_3)

	private Bundle bundle;
	
	private static String urlPath= ConfigInfo.dota2UrlPath;
	private static  String targetDir = ConfigInfo.dota2TargetDir;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.dota2_hero_menu);

		iniController();
		iniListener();
		iniVariable();

		mRadioButton1.setChecked(true);
		mViewPager.setCurrentItem(1);
		mCurrentCheckedRadioLeft = getCurrentCheckedRadioLeft();

		initHero();
		//如果没有dota2这个文件夹，新建一个
		
	}

	public void initHero() {
		String[] herosStrength = DotaHeros.dota2Heros_Strength;
		for (String hero : herosStrength) {
			int resID = getResources()
					.getIdentifier(hero, "id", "com.wdf.dota");
			ImageView view = (ImageView) mViews.get(1).findViewById(resID);
			InputStream fis;
			try {
				fis = getAssets().open("dota2/" + hero + ".jpg");
				Bitmap bm = BitmapFactory.decodeStream(fis);
				view.setImageBitmap(bm);
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		String[] herosAgile = DotaHeros.dota2Heros_Agile;
		for (String hero : herosAgile) {
			int resID = getResources()
					.getIdentifier(hero, "id", "com.wdf.dota");
			ImageView view = (ImageView) mViews.get(2).findViewById(resID);
			InputStream fis;
			try {
				fis = getAssets().open("dota2/" + hero + ".jpg");
				Bitmap bm = BitmapFactory.decodeStream(fis);
				view.setImageBitmap(bm);
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		String[] herosIntelgence = DotaHeros.dota2Heros_Intelgence;
		for (String hero : herosIntelgence) {
			int resID = getResources()
					.getIdentifier(hero, "id", "com.wdf.dota");
			ImageView view = (ImageView) mViews.get(3).findViewById(resID);
			InputStream fis;
			try {
				fis = getAssets().open("dota2/" + hero + ".jpg");
				Bitmap bm = BitmapFactory.decodeStream(fis);
				view.setImageBitmap(bm);
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
	}

	private void iniVariable() {
		// TODO Auto-generated method stub
		mViews = new ArrayList<View>();
		mViews.add(getLayoutInflater().inflate(R.layout.dota2_hero_menu0, null));
		mViews.add(getLayoutInflater().inflate(R.layout.dota2_hero_menu1, null));
		mViews.add(getLayoutInflater().inflate(R.layout.dota2_hero_menu2, null));
		mViews.add(getLayoutInflater().inflate(R.layout.dota2_hero_menu3, null));

		mViewPager.setAdapter(new MyPagerAdapter());// 设置ViewPager的适配器
	}

	/**
	 * RadioGroup点击CheckedChanged监听
	 */
	@Override
	public void onCheckedChanged(RadioGroup group, int checkedId) {

		AnimationSet _AnimationSet = new AnimationSet(true);
		TranslateAnimation _TranslateAnimation;

		if (checkedId == R.id.btn1) {
			_TranslateAnimation = new TranslateAnimation(
					mCurrentCheckedRadioLeft, getResources().getDimension(
							R.dimen.rdo1), 0f, 0f);
			_AnimationSet.addAnimation(_TranslateAnimation);
			_AnimationSet.setFillBefore(false);
			_AnimationSet.setFillAfter(true);
			_AnimationSet.setDuration(100);

			mViewPager.setCurrentItem(1);// 让下方ViewPager跟随上面的HorizontalScrollView切换
		} else if (checkedId == R.id.btn2) {
			_TranslateAnimation = new TranslateAnimation(
					mCurrentCheckedRadioLeft, getResources().getDimension(
							R.dimen.rdo2), 0f, 0f);

			_AnimationSet.addAnimation(_TranslateAnimation);
			_AnimationSet.setFillBefore(false);
			_AnimationSet.setFillAfter(true);
			_AnimationSet.setDuration(100);

			mViewPager.setCurrentItem(2);
		} else if (checkedId == R.id.btn3) {
			_TranslateAnimation = new TranslateAnimation(
					mCurrentCheckedRadioLeft, getResources().getDimension(
							R.dimen.rdo3), 0f, 0f);

			_AnimationSet.addAnimation(_TranslateAnimation);
			_AnimationSet.setFillBefore(false);
			_AnimationSet.setFillAfter(true);
			_AnimationSet.setDuration(100);

			mViewPager.setCurrentItem(3);
		}

		mCurrentCheckedRadioLeft = getCurrentCheckedRadioLeft();// 更新当前蓝色横条距离左边的距离

		Log.i("zj", "getCurrentCheckedRadioLeft="
				+ getCurrentCheckedRadioLeft());
		Log.i("zj", "getDimension=" + getResources().getDimension(R.dimen.rdo2));

		mHorizontalScrollView.smoothScrollTo((int) mCurrentCheckedRadioLeft
				- (int) getResources().getDimension(R.dimen.rdo2), 0);
	}

	/**
	 * 获得当前被选中的RadioButton距离左侧的距离
	 */
	private float getCurrentCheckedRadioLeft() {
		// TODO Auto-generated method stub
		if (mRadioButton1.isChecked()) {
			// Log.i("zj",
			// "currentCheckedRadioLeft="+getResources().getDimension(R.dimen.rdo1));
			return getResources().getDimension(R.dimen.rdo1);
		} else if (mRadioButton2.isChecked()) {
			// Log.i("zj",
			// "currentCheckedRadioLeft="+getResources().getDimension(R.dimen.rdo2));
			return getResources().getDimension(R.dimen.rdo2);
		} else if (mRadioButton3.isChecked()) {
			// Log.i("zj",
			// "currentCheckedRadioLeft="+getResources().getDimension(R.dimen.rdo3));
			return getResources().getDimension(R.dimen.rdo3);
		}
		return 0f;
	}

	private void iniListener() {
		// TODO Auto-generated method stub

		mRadioGroup.setOnCheckedChangeListener(this);

		mViewPager.setOnPageChangeListener(new MyPagerOnPageChangeListener());
	}

	private void iniController() {
		// TODO Auto-generated method stub
		mRadioGroup = (RadioGroup) findViewById(R.id.radioGroup);
		mRadioButton1 = (RadioButton) findViewById(R.id.btn1);
		mRadioButton2 = (RadioButton) findViewById(R.id.btn2);
		mRadioButton3 = (RadioButton) findViewById(R.id.btn3);

		mHorizontalScrollView = (HorizontalScrollView) findViewById(R.id.horizontalScrollView);

		mViewPager = (ViewPager) findViewById(R.id.pager);
	}

	/**
	 * ViewPager的适配器
	 * 
	 * @author zj 2012-5-24 下午2:26:57
	 */
	private class MyPagerAdapter extends PagerAdapter {

		@Override
		public void destroyItem(View v, int position, Object obj) {
			// TODO Auto-generated method stub
			((ViewPager) v).removeView(mViews.get(position));
		}

		@Override
		public void finishUpdate(View arg0) {
			// TODO Auto-generated method stub

		}

		@Override
		public int getCount() {
			// TODO Auto-generated method stub
			return mViews.size();
		}

		@Override
		public Object instantiateItem(View v, int position) {
			((ViewPager) v).addView(mViews.get(position));
			return mViews.get(position);
		}

		@Override
		public boolean isViewFromObject(View arg0, Object arg1) {
			// TODO Auto-generated method stub
			return arg0 == arg1;
		}

		@Override
		public void restoreState(Parcelable arg0, ClassLoader arg1) {
			// TODO Auto-generated method stub

		}

		@Override
		public Parcelable saveState() {
			// TODO Auto-generated method stub
			return null;
		}

		@Override
		public void startUpdate(View arg0) {
			// TODO Auto-generated method stub

		}

	}

	/**
	 * ViewPager的PageChangeListener(页面改变的监听器)
	 * 
	 * @author zj 2012-5-24 下午3:14:27
	 */
	private class MyPagerOnPageChangeListener implements OnPageChangeListener {

		@Override
		public void onPageScrollStateChanged(int arg0) {
			// TODO Auto-generated method stub

		}

		@Override
		public void onPageScrolled(int arg0, float arg1, int arg2) {
			// TODO Auto-generated method stub

		}

		/**
		 * 滑动ViewPager的时候,让上方的HorizontalScrollView自动切换
		 */
		@Override
		public void onPageSelected(int position) {
			// TODO Auto-generated method stub
			// Log.i("zj", "position="+position);

			if (position == 0) {
				mViewPager.setCurrentItem(1);
			} else if (position == 1) {
				mRadioButton1.performClick();
			} else if (position == 2) {
				mRadioButton2.performClick();
			} else if (position == 3) {
				mRadioButton3.performClick();
			} else if (position == 4) {
				mViewPager.setCurrentItem(3);
			}
		}

	}

	public void myHandler(View target) {
		bundle = new Bundle();

	    Intent	intent = new Intent(this, Dota2HeroViewActivity.class);

		String heroname = "";
		//与dota不一样，只加入技能
		String skill1="";
		String skill2="";
		String skill3="";
		String skill4="";
		
		String url = "";
		String targetDir = "";
		switch (target.getId()) {
		/*
		case R.id.earthshaker:heroname = "earthshaker";break;
		case R.id.sven:heroname = "sven";break;
		case R.id.tiny:heroname = "tiny";break;
		case R.id.kunkka:heroname = "kunkka";break;
		case R.id.beastmaster:heroname = "beastmaster";break;
		case R.id.dragon_knight:heroname = "dragon_knight";break;
		case R.id.rattletrap:heroname = "rattletrap";break;
		case R.id.omniknight:heroname = "omniknight";break;
		case R.id.huskar:heroname = "huskar";break;
		case R.id.alchemist:heroname = "alchemist";break;
		case R.id.brewmaster:heroname = "brewmaster";break;
		case R.id.treant:heroname = "treant";break;
		case R.id.wisp:heroname = "wisp";break;
		case R.id.centaur:heroname = "centaur";break;
		case R.id.axe:heroname = "axe";break;
		case R.id.pudge:heroname = "pudge";break;
		case R.id.sand_king:heroname = "sand_king";break;
		case R.id.slardar:heroname = "slardar";break;
		case R.id.tidehunter:heroname = "tidehunter";break;
		case R.id.skeleton_king:heroname = "skeleton_king";break;
		case R.id.life_stealer:heroname = "life_stealer";break;
		case R.id.night_stalker:heroname = "night_stalker";break;
		case R.id.doom_bringer:heroname = "doom_bringer";break;
		case R.id.spirit_breaker:heroname = "spirit_breaker";break;
		case R.id.lycan:heroname = "lycan";break;
		case R.id.chaos_knight:heroname = "chaos_knight";break;
		case R.id.undying:heroname = "undying";break;
		case R.id.antimage:heroname = "antimage";break;
		case R.id.drow_ranger:heroname = "drow_ranger";break;
		case R.id.juggernaut:heroname = "juggernaut";break;
		case R.id.mirana:heroname = "mirana";break;
		case R.id.morphling:heroname = "morphling";break;
		case R.id.phantom_lancer:heroname = "phantom_lancer";break;
		case R.id.vengefulspirit:heroname = "vengefulspirit";break;
		case R.id.riki:heroname = "riki";break;
		case R.id.sniper:heroname = "sniper";break;
		case R.id.templar_assassin:heroname = "templar_assassin";break;
		case R.id.luna:heroname = "luna";break;
		case R.id.bounty_hunter:heroname = "bounty_hunter";break;
		case R.id.ursa:heroname = "ursa";break;
		case R.id.gyrocopter:heroname = "gyrocopter";break;
		case R.id.lone_druid:heroname = "lone_druid";break;
		case R.id.naga_siren:heroname = "naga_siren";break;
		case R.id.bloodseeker:heroname = "bloodseeker";break;
		case R.id.nevermore:heroname = "nevermore";break;
		case R.id.razor:heroname = "razor";break;
		case R.id.venomancer:heroname = "venomancer";break;
		case R.id.faceless_void:heroname = "faceless_void";break;
		case R.id.phantom_assassin:heroname = "phantom_assassin";break;
		case R.id.viper:heroname = "viper";break;
		case R.id.clinkz:heroname = "clinkz";break;
		case R.id.broodmother:heroname = "broodmother";break;
		case R.id.weaver:heroname = "weaver";break;
		case R.id.spectre:heroname = "spectre";break;
		case R.id.crystal_maiden:heroname = "crystal_maiden";break;
		case R.id.puck:heroname = "puck";break;
		case R.id.storm_spirit:heroname = "storm_spirit";break;
		case R.id.windrunner:heroname = "windrunner";break;
		case R.id.zuus:heroname = "zuus";break;
		case R.id.lina:heroname = "lina";break;
		case R.id.shadow_shaman:heroname = "shadow_shaman";break;
		case R.id.tinker:heroname = "tinker";break;
		case R.id.furion:heroname = "furion";break;
		case R.id.enchantress:heroname = "enchantress";break;
		case R.id.jakiro:heroname = "jakiro";break;
		case R.id.chen:heroname = "chen";break;
		case R.id.silencer:heroname = "silencer";break;
		case R.id.ogre_magi:heroname = "ogre_magi";break;
		case R.id.rubick:heroname = "rubick";break;
		case R.id.disruptor:heroname = "disruptor";break;
		case R.id.keeper_of_the_light:heroname = "keeper_of_the_light";break;
		case R.id.bane:heroname = "bane";break;
		case R.id.lich:heroname = "lich";break;
		case R.id.lion:heroname = "lion";break;
		case R.id.witch_doctor:heroname = "witch_doctor";break;
		case R.id.enigma:heroname = "enigma";break;
		case R.id.necrolyte:heroname = "necrolyte";break;
		case R.id.warlock:heroname = "warlock";break;
		case R.id.death_prophet:heroname = "death_prophet";break;
		case R.id.pugna:heroname = "pugna";break;
		case R.id.dazzle:heroname = "dazzle";break;
		case R.id.leshrac:heroname = "leshrac";break;
		case R.id.dark_seer:heroname = "dark_seer";break;
		case R.id.batrider:heroname = "batrider";break;
		case R.id.ancient_apparition:heroname = "ancient_apparition";break;
		case R.id.invoker:heroname = "invoker";break;
		case R.id.legion:heroname = "legion";break;
		case R.id.shredder:heroname = "shredder";break;
		case R.id.bristleback:heroname = "bristleback";break;
		case R.id.tusk:heroname = "tusk";break;
		case R.id.earth_spirit:heroname = "earth_spirit";break;
		case R.id.magnataur:heroname = "magnataur";break;
		case R.id.abaddon:heroname = "abaddon";break;
		case R.id.troll_warlord:heroname = "troll_warlord";break;
		case R.id.meepo:heroname = "meepo";break;
		case R.id.nyx_assassin:heroname = "nyx_assassin";break;
		case R.id.slark:heroname = "slark";break;
		case R.id.medusa:heroname = "medusa";break;
		case R.id.skywrath_mage:heroname = "skywrath_mage";break;
		case R.id.obsidian_destroyer:heroname = "obsidian_destroyer";break;
		case R.id.shadow_demon:heroname = "shadow_demon";break;
		case R.id.visage:heroname = "visage";break;
		case R.id.elder_titan:heroname = "elder_titan";break;
		case R.id.phoenix_full:heroname = "phoenix_full";break;
		case R.id.ember_spirit:heroname = "ember_spirit";break;
		case R.id.terrorblade:heroname = "terrorblade";break;
		*/
		
	/*	
		case R.id.earthshaker:heroname = "earthshaker";skill1=Dota2HeroSkill.earthshaker_skill1;skill2= Dota2HeroSkill.earthshaker_skill2;skill3 =Dota2HeroSkill.earthshaker_skill3;skill4 =Dota2HeroSkill.earthshaker_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/earthshaker.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/earthshaker.mp3";break;
		case R.id.sven:heroname = "sven";skill1=Dota2HeroSkill.sven_skill1;skill2= Dota2HeroSkill.sven_skill2;skill3 =Dota2HeroSkill.sven_skill3;skill4 =Dota2HeroSkill.sven_skill4;break;
		case R.id.tiny:heroname = "tiny";skill1=Dota2HeroSkill.tiny_skill1;skill2= Dota2HeroSkill.tiny_skill2;skill3 =Dota2HeroSkill.tiny_skill3;skill4 =Dota2HeroSkill.tiny_skill4;break;
		case R.id.kunkka:heroname = "kunkka";skill1=Dota2HeroSkill.kunkka_skill1;skill2= Dota2HeroSkill.kunkka_skill2;skill3 =Dota2HeroSkill.kunkka_skill3;skill4 =Dota2HeroSkill.kunkka_skill4;break;
		case R.id.beastmaster:heroname = "beastmaster";skill1=Dota2HeroSkill.beastmaster_skill1;skill2= Dota2HeroSkill.beastmaster_skill2;skill3 =Dota2HeroSkill.beastmaster_skill3;skill4 =Dota2HeroSkill.beastmaster_skill4;break;
		case R.id.dragon_knight:heroname = "dragon_knight";skill1=Dota2HeroSkill.dragon_knight_skill1;skill2= Dota2HeroSkill.dragon_knight_skill2;skill3 =Dota2HeroSkill.dragon_knight_skill3;skill4 =Dota2HeroSkill.dragon_knight_skill4;break;
		case R.id.rattletrap:heroname = "rattletrap";skill1=Dota2HeroSkill.rattletrap_skill1;skill2= Dota2HeroSkill.rattletrap_skill2;skill3 =Dota2HeroSkill.rattletrap_skill3;skill4 =Dota2HeroSkill.rattletrap_skill4;break;
		case R.id.omniknight:heroname = "omniknight";skill1=Dota2HeroSkill.omniknight_skill1;skill2= Dota2HeroSkill.omniknight_skill2;skill3 =Dota2HeroSkill.omniknight_skill3;skill4 =Dota2HeroSkill.omniknight_skill4;break;
		case R.id.huskar:heroname = "huskar";skill1=Dota2HeroSkill.huskar_skill1;skill2= Dota2HeroSkill.huskar_skill2;skill3 =Dota2HeroSkill.huskar_skill3;skill4 =Dota2HeroSkill.huskar_skill4;break;
		case R.id.alchemist:heroname = "alchemist";skill1=Dota2HeroSkill.alchemist_skill1;skill2= Dota2HeroSkill.alchemist_skill2;skill3 =Dota2HeroSkill.alchemist_skill3;skill4 =Dota2HeroSkill.alchemist_skill4;break;
		case R.id.brewmaster:heroname = "brewmaster";skill1=Dota2HeroSkill.brewmaster_skill1;skill2= Dota2HeroSkill.brewmaster_skill2;skill3 =Dota2HeroSkill.brewmaster_skill3;skill4 =Dota2HeroSkill.brewmaster_skill4;break;
		case R.id.treant:heroname = "treant";skill1=Dota2HeroSkill.treant_skill1;skill2= Dota2HeroSkill.treant_skill2;skill3 =Dota2HeroSkill.treant_skill3;skill4 =Dota2HeroSkill.treant_skill4;break;
		case R.id.wisp:heroname = "wisp";skill1=Dota2HeroSkill.wisp_skill1;skill2= Dota2HeroSkill.wisp_skill2;skill3 =Dota2HeroSkill.wisp_skill3;skill4 =Dota2HeroSkill.wisp_skill4;break;
		case R.id.centaur:heroname = "centaur";skill1=Dota2HeroSkill.centaur_skill1;skill2= Dota2HeroSkill.centaur_skill2;skill3 =Dota2HeroSkill.centaur_skill3;skill4 =Dota2HeroSkill.centaur_skill4;break;
		case R.id.axe:heroname = "axe";skill1=Dota2HeroSkill.axe_skill1;skill2= Dota2HeroSkill.axe_skill2;skill3 =Dota2HeroSkill.axe_skill3;skill4 =Dota2HeroSkill.axe_skill4;break;
		case R.id.pudge:heroname = "pudge";skill1=Dota2HeroSkill.pudge_skill1;skill2= Dota2HeroSkill.pudge_skill2;skill3 =Dota2HeroSkill.pudge_skill3;skill4 =Dota2HeroSkill.pudge_skill4;break;
		case R.id.sand_king:heroname = "sand_king";skill1=Dota2HeroSkill.sand_king_skill1;skill2= Dota2HeroSkill.sand_king_skill2;skill3 =Dota2HeroSkill.sand_king_skill3;skill4 =Dota2HeroSkill.sand_king_skill4;break;
		case R.id.slardar:heroname = "slardar";skill1=Dota2HeroSkill.slardar_skill1;skill2= Dota2HeroSkill.slardar_skill2;skill3 =Dota2HeroSkill.slardar_skill3;skill4 =Dota2HeroSkill.slardar_skill4;break;
		case R.id.tidehunter:heroname = "tidehunter";skill1=Dota2HeroSkill.tidehunter_skill1;skill2= Dota2HeroSkill.tidehunter_skill2;skill3 =Dota2HeroSkill.tidehunter_skill3;skill4 =Dota2HeroSkill.tidehunter_skill4;break;
		case R.id.skeleton_king:heroname = "skeleton_king";skill1=Dota2HeroSkill.skeleton_king_skill1;skill2= Dota2HeroSkill.skeleton_king_skill2;skill3 =Dota2HeroSkill.skeleton_king_skill3;skill4 =Dota2HeroSkill.skeleton_king_skill4;break;
		case R.id.life_stealer:heroname = "life_stealer";skill1=Dota2HeroSkill.life_stealer_skill1;skill2= Dota2HeroSkill.life_stealer_skill2;skill3 =Dota2HeroSkill.life_stealer_skill3;skill4 =Dota2HeroSkill.life_stealer_skill4;break;
		case R.id.night_stalker:heroname = "night_stalker";skill1=Dota2HeroSkill.night_stalker_skill1;skill2= Dota2HeroSkill.night_stalker_skill2;skill3 =Dota2HeroSkill.night_stalker_skill3;skill4 =Dota2HeroSkill.night_stalker_skill4;break;
		case R.id.doom_bringer:heroname = "doom_bringer";skill1=Dota2HeroSkill.doom_bringer_skill1;skill2= Dota2HeroSkill.doom_bringer_skill2;skill3 =Dota2HeroSkill.doom_bringer_skill3;skill4 =Dota2HeroSkill.doom_bringer_skill4;break;
		case R.id.spirit_breaker:heroname = "spirit_breaker";skill1=Dota2HeroSkill.spirit_breaker_skill1;skill2= Dota2HeroSkill.spirit_breaker_skill2;skill3 =Dota2HeroSkill.spirit_breaker_skill3;skill4 =Dota2HeroSkill.spirit_breaker_skill4;break;
		case R.id.lycan:heroname = "lycan";skill1=Dota2HeroSkill.lycan_skill1;skill2= Dota2HeroSkill.lycan_skill2;skill3 =Dota2HeroSkill.lycan_skill3;skill4 =Dota2HeroSkill.lycan_skill4;break;
		case R.id.chaos_knight:heroname = "chaos_knight";skill1=Dota2HeroSkill.chaos_knight_skill1;skill2= Dota2HeroSkill.chaos_knight_skill2;skill3 =Dota2HeroSkill.chaos_knight_skill3;skill4 =Dota2HeroSkill.chaos_knight_skill4;break;
		case R.id.undying:heroname = "undying";skill1=Dota2HeroSkill.undying_skill1;skill2= Dota2HeroSkill.undying_skill2;skill3 =Dota2HeroSkill.undying_skill3;skill4 =Dota2HeroSkill.undying_skill4;break;
		case R.id.shredder:heroname = "shredder";skill1=Dota2HeroSkill.shredder_skill1;skill2= Dota2HeroSkill.shredder_skill2;skill3 =Dota2HeroSkill.shredder_skill3;skill4 =Dota2HeroSkill.shredder_skill4;break;
		case R.id.bristleback:heroname = "bristleback";skill1=Dota2HeroSkill.bristleback_skill1;skill2= Dota2HeroSkill.bristleback_skill2;skill3 =Dota2HeroSkill.bristleback_skill3;skill4 =Dota2HeroSkill.bristleback_skill4;break;
		case R.id.tusk:heroname = "tusk";skill1=Dota2HeroSkill.tusk_skill1;skill2= Dota2HeroSkill.tusk_skill2;skill3 =Dota2HeroSkill.tusk_skill3;skill4 =Dota2HeroSkill.tusk_skill4;break;
		case R.id.elder_titan:heroname = "elder_titan";skill1=Dota2HeroSkill.elder_titan_skill1;skill2= Dota2HeroSkill.elder_titan_skill2;skill3 =Dota2HeroSkill.elder_titan_skill3;skill4 =Dota2HeroSkill.elder_titan_skill4;break;
		case R.id.earth_spirit:heroname = "earth_spirit";skill1=Dota2HeroSkill.earth_spirit_skill1;skill2= Dota2HeroSkill.earth_spirit_skill2;skill3 =Dota2HeroSkill.earth_spirit_skill3;skill4 =Dota2HeroSkill.earth_spirit_skill4;break;
		case R.id.magnataur:heroname = "magnataur";skill1=Dota2HeroSkill.magnataur_skill1;skill2= Dota2HeroSkill.magnataur_skill2;skill3 =Dota2HeroSkill.magnataur_skill3;skill4 =Dota2HeroSkill.magnataur_skill4;break;
		case R.id.abaddon:heroname = "abaddon";skill1=Dota2HeroSkill.abaddon_skill1;skill2= Dota2HeroSkill.abaddon_skill2;skill3 =Dota2HeroSkill.abaddon_skill3;skill4 =Dota2HeroSkill.abaddon_skill4;break;
		case R.id.legion:heroname = "legion";skill1=Dota2HeroSkill.legion_skill1;skill2= Dota2HeroSkill.legion_skill2;skill3 =Dota2HeroSkill.legion_skill3;skill4 =Dota2HeroSkill.legion_skill4;break;
		case R.id.phoenix_full:heroname = "phoenix_full";skill1=Dota2HeroSkill.phoenix_full_skill1;skill2= Dota2HeroSkill.phoenix_full_skill2;skill3 =Dota2HeroSkill.phoenix_full_skill3;skill4 =Dota2HeroSkill.phoenix_full_skill4;break;
		//------Agile----------------------------------
		case R.id.antimage:heroname = "antimage";skill1=Dota2HeroSkill.antimage_skill1;skill2= Dota2HeroSkill.antimage_skill2;skill3 =Dota2HeroSkill.antimage_skill3;skill4 =Dota2HeroSkill.antimage_skill4;break;
		case R.id.drow_ranger:heroname = "drow_ranger";skill1=Dota2HeroSkill.drow_ranger_skill1;skill2= Dota2HeroSkill.drow_ranger_skill2;skill3 =Dota2HeroSkill.drow_ranger_skill3;skill4 =Dota2HeroSkill.drow_ranger_skill4;break;
		case R.id.juggernaut:heroname = "juggernaut";skill1=Dota2HeroSkill.juggernaut_skill1;skill2= Dota2HeroSkill.juggernaut_skill2;skill3 =Dota2HeroSkill.juggernaut_skill3;skill4 =Dota2HeroSkill.juggernaut_skill4;break;
		case R.id.mirana:heroname = "mirana";skill1=Dota2HeroSkill.mirana_skill1;skill2= Dota2HeroSkill.mirana_skill2;skill3 =Dota2HeroSkill.mirana_skill3;skill4 =Dota2HeroSkill.mirana_skill4;break;
		case R.id.morphling:heroname = "morphling";skill1=Dota2HeroSkill.morphling_skill1;skill2= Dota2HeroSkill.morphling_skill2;skill3 =Dota2HeroSkill.morphling_skill3;skill4 =Dota2HeroSkill.morphling_skill4;break;
		case R.id.phantom_lancer:heroname = "phantom_lancer";skill1=Dota2HeroSkill.phantom_lancer_skill1;skill2= Dota2HeroSkill.phantom_lancer_skill2;skill3 =Dota2HeroSkill.phantom_lancer_skill3;skill4 =Dota2HeroSkill.phantom_lancer_skill4;break;
		case R.id.vengefulspirit:heroname = "vengefulspirit";skill1=Dota2HeroSkill.vengefulspirit_skill1;skill2= Dota2HeroSkill.vengefulspirit_skill2;skill3 =Dota2HeroSkill.vengefulspirit_skill3;skill4 =Dota2HeroSkill.vengefulspirit_skill4;break;
		case R.id.riki:heroname = "riki";skill1=Dota2HeroSkill.riki_skill1;skill2= Dota2HeroSkill.riki_skill2;skill3 =Dota2HeroSkill.riki_skill3;skill4 =Dota2HeroSkill.riki_skill4;break;
		case R.id.sniper:heroname = "sniper";skill1=Dota2HeroSkill.sniper_skill1;skill2= Dota2HeroSkill.sniper_skill2;skill3 =Dota2HeroSkill.sniper_skill3;skill4 =Dota2HeroSkill.sniper_skill4;break;
		case R.id.templar_assassin:heroname = "templar_assassin";skill1=Dota2HeroSkill.templar_assassin_skill1;skill2= Dota2HeroSkill.templar_assassin_skill2;skill3 =Dota2HeroSkill.templar_assassin_skill3;skill4 =Dota2HeroSkill.templar_assassin_skill4;break;
		case R.id.luna:heroname = "luna";skill1=Dota2HeroSkill.luna_skill1;skill2= Dota2HeroSkill.luna_skill2;skill3 =Dota2HeroSkill.luna_skill3;skill4 =Dota2HeroSkill.luna_skill4;break;
		case R.id.bounty_hunter:heroname = "bounty_hunter";skill1=Dota2HeroSkill.bounty_hunter_skill1;skill2= Dota2HeroSkill.bounty_hunter_skill2;skill3 =Dota2HeroSkill.bounty_hunter_skill3;skill4 =Dota2HeroSkill.bounty_hunter_skill4;break;
		case R.id.ursa:heroname = "ursa";skill1=Dota2HeroSkill.ursa_skill1;skill2= Dota2HeroSkill.ursa_skill2;skill3 =Dota2HeroSkill.ursa_skill3;skill4 =Dota2HeroSkill.ursa_skill4;break;
		case R.id.gyrocopter:heroname = "gyrocopter";skill1=Dota2HeroSkill.gyrocopter_skill1;skill2= Dota2HeroSkill.gyrocopter_skill2;skill3 =Dota2HeroSkill.gyrocopter_skill3;skill4 =Dota2HeroSkill.gyrocopter_skill4;break;
		case R.id.lone_druid:heroname = "lone_druid";skill1=Dota2HeroSkill.lone_druid_skill1;skill2= Dota2HeroSkill.lone_druid_skill2;skill3 =Dota2HeroSkill.lone_druid_skill3;skill4 =Dota2HeroSkill.lone_druid_skill4;break;
		case R.id.naga_siren:heroname = "naga_siren";skill1=Dota2HeroSkill.naga_siren_skill1;skill2= Dota2HeroSkill.naga_siren_skill2;skill3 =Dota2HeroSkill.naga_siren_skill3;skill4 =Dota2HeroSkill.naga_siren_skill4;break;
		case R.id.bloodseeker:heroname = "bloodseeker";skill1=Dota2HeroSkill.bloodseeker_skill1;skill2= Dota2HeroSkill.bloodseeker_skill2;skill3 =Dota2HeroSkill.bloodseeker_skill3;skill4 =Dota2HeroSkill.bloodseeker_skill4;break;
		case R.id.nevermore:heroname = "nevermore";skill1=Dota2HeroSkill.nevermore_skill1;skill2= Dota2HeroSkill.nevermore_skill2;skill3 =Dota2HeroSkill.nevermore_skill3;skill4 =Dota2HeroSkill.nevermore_skill4;break;
		case R.id.razor:heroname = "razor";skill1=Dota2HeroSkill.razor_skill1;skill2= Dota2HeroSkill.razor_skill2;skill3 =Dota2HeroSkill.razor_skill3;skill4 =Dota2HeroSkill.razor_skill4;break;
		case R.id.venomancer:heroname = "venomancer";skill1=Dota2HeroSkill.venomancer_skill1;skill2= Dota2HeroSkill.venomancer_skill2;skill3 =Dota2HeroSkill.venomancer_skill3;skill4 =Dota2HeroSkill.venomancer_skill4;break;
		case R.id.faceless_void:heroname = "faceless_void";skill1=Dota2HeroSkill.faceless_void_skill1;skill2= Dota2HeroSkill.faceless_void_skill2;skill3 =Dota2HeroSkill.faceless_void_skill3;skill4 =Dota2HeroSkill.faceless_void_skill4;break;
		case R.id.phantom_assassin:heroname = "phantom_assassin";skill1=Dota2HeroSkill.phantom_assassin_skill1;skill2= Dota2HeroSkill.phantom_assassin_skill2;skill3 =Dota2HeroSkill.phantom_assassin_skill3;skill4 =Dota2HeroSkill.phantom_assassin_skill4;break;
		case R.id.viper:heroname = "viper";skill1=Dota2HeroSkill.viper_skill1;skill2= Dota2HeroSkill.viper_skill2;skill3 =Dota2HeroSkill.viper_skill3;skill4 =Dota2HeroSkill.viper_skill4;break;
		case R.id.clinkz:heroname = "clinkz";skill1=Dota2HeroSkill.clinkz_skill1;skill2= Dota2HeroSkill.clinkz_skill2;skill3 =Dota2HeroSkill.clinkz_skill3;skill4 =Dota2HeroSkill.clinkz_skill4;break;
		case R.id.broodmother:heroname = "broodmother";skill1=Dota2HeroSkill.broodmother_skill1;skill2= Dota2HeroSkill.broodmother_skill2;skill3 =Dota2HeroSkill.broodmother_skill3;skill4 =Dota2HeroSkill.broodmother_skill4;break;
		case R.id.weaver:heroname = "weaver";skill1=Dota2HeroSkill.weaver_skill1;skill2= Dota2HeroSkill.weaver_skill2;skill3 =Dota2HeroSkill.weaver_skill3;skill4 =Dota2HeroSkill.weaver_skill4;break;
		case R.id.spectre:heroname = "spectre";skill1=Dota2HeroSkill.spectre_skill1;skill2= Dota2HeroSkill.spectre_skill2;skill3 =Dota2HeroSkill.spectre_skill3;skill4 =Dota2HeroSkill.spectre_skill4;break;
		case R.id.troll_warlord:heroname = "troll_warlord";skill1=Dota2HeroSkill.troll_warlord_skill1;skill2= Dota2HeroSkill.troll_warlord_skill2;skill3 =Dota2HeroSkill.troll_warlord_skill3;skill4 =Dota2HeroSkill.troll_warlord_skill4;break;
		case R.id.meepo:heroname = "meepo";skill1=Dota2HeroSkill.meepo_skill1;skill2= Dota2HeroSkill.meepo_skill2;skill3 =Dota2HeroSkill.meepo_skill3;skill4 =Dota2HeroSkill.meepo_skill4;break;
		case R.id.nyx_assassin:heroname = "nyx_assassin";skill1=Dota2HeroSkill.nyx_assassin_skill1;skill2= Dota2HeroSkill.nyx_assassin_skill2;skill3 =Dota2HeroSkill.nyx_assassin_skill3;skill4 =Dota2HeroSkill.nyx_assassin_skill4;break;
		case R.id.slark:heroname = "slark";skill1=Dota2HeroSkill.slark_skill1;skill2= Dota2HeroSkill.slark_skill2;skill3 =Dota2HeroSkill.slark_skill3;skill4 =Dota2HeroSkill.slark_skill4;break;
		case R.id.medusa:heroname = "medusa";skill1=Dota2HeroSkill.medusa_skill1;skill2= Dota2HeroSkill.medusa_skill2;skill3 =Dota2HeroSkill.medusa_skill3;skill4 =Dota2HeroSkill.medusa_skill4;break;
		case R.id.ember_spirit:heroname = "ember_spirit";skill1=Dota2HeroSkill.ember_spirit_skill1;skill2= Dota2HeroSkill.ember_spirit_skill2;skill3 =Dota2HeroSkill.ember_spirit_skill3;skill4 =Dota2HeroSkill.ember_spirit_skill4;break;
		case R.id.terrorblade:heroname = "terrorblade";skill1=Dota2HeroSkill.terrorblade_skill1;skill2= Dota2HeroSkill.terrorblade_skill2;skill3 =Dota2HeroSkill.terrorblade_skill3;skill4 =Dota2HeroSkill.terrorblade_skill4;break;
		//------Intelgence----------------------------------
		case R.id.crystal_maiden:heroname = "crystal_maiden";skill1=Dota2HeroSkill.crystal_maiden_skill1;skill2= Dota2HeroSkill.crystal_maiden_skill2;skill3 =Dota2HeroSkill.crystal_maiden_skill3;skill4 =Dota2HeroSkill.crystal_maiden_skill4;break;
		case R.id.puck:heroname = "puck";skill1=Dota2HeroSkill.puck_skill1;skill2= Dota2HeroSkill.puck_skill2;skill3 =Dota2HeroSkill.puck_skill3;skill4 =Dota2HeroSkill.puck_skill4;break;
		case R.id.storm_spirit:heroname = "storm_spirit";skill1=Dota2HeroSkill.storm_spirit_skill1;skill2= Dota2HeroSkill.storm_spirit_skill2;skill3 =Dota2HeroSkill.storm_spirit_skill3;skill4 =Dota2HeroSkill.storm_spirit_skill4;break;
		case R.id.windrunner:heroname = "windrunner";skill1=Dota2HeroSkill.windrunner_skill1;skill2= Dota2HeroSkill.windrunner_skill2;skill3 =Dota2HeroSkill.windrunner_skill3;skill4 =Dota2HeroSkill.windrunner_skill4;break;
		case R.id.zuus:heroname = "zuus";skill1=Dota2HeroSkill.zuus_skill1;skill2= Dota2HeroSkill.zuus_skill2;skill3 =Dota2HeroSkill.zuus_skill3;skill4 =Dota2HeroSkill.zuus_skill4;break;
		case R.id.lina:heroname = "lina";skill1=Dota2HeroSkill.lina_skill1;skill2= Dota2HeroSkill.lina_skill2;skill3 =Dota2HeroSkill.lina_skill3;skill4 =Dota2HeroSkill.lina_skill4;break;
		case R.id.shadow_shaman:heroname = "shadow_shaman";skill1=Dota2HeroSkill.shadow_shaman_skill1;skill2= Dota2HeroSkill.shadow_shaman_skill2;skill3 =Dota2HeroSkill.shadow_shaman_skill3;skill4 =Dota2HeroSkill.shadow_shaman_skill4;break;
		case R.id.tinker:heroname = "tinker";skill1=Dota2HeroSkill.tinker_skill1;skill2= Dota2HeroSkill.tinker_skill2;skill3 =Dota2HeroSkill.tinker_skill3;skill4 =Dota2HeroSkill.tinker_skill4;break;
		case R.id.furion:heroname = "furion";skill1=Dota2HeroSkill.furion_skill1;skill2= Dota2HeroSkill.furion_skill2;skill3 =Dota2HeroSkill.furion_skill3;skill4 =Dota2HeroSkill.furion_skill4;break;
		case R.id.enchantress:heroname = "enchantress";skill1=Dota2HeroSkill.enchantress_skill1;skill2= Dota2HeroSkill.enchantress_skill2;skill3 =Dota2HeroSkill.enchantress_skill3;skill4 =Dota2HeroSkill.enchantress_skill4;break;
		case R.id.jakiro:heroname = "jakiro";skill1=Dota2HeroSkill.jakiro_skill1;skill2= Dota2HeroSkill.jakiro_skill2;skill3 =Dota2HeroSkill.jakiro_skill3;skill4 =Dota2HeroSkill.jakiro_skill4;break;
		case R.id.chen:heroname = "chen";skill1=Dota2HeroSkill.chen_skill1;skill2= Dota2HeroSkill.chen_skill2;skill3 =Dota2HeroSkill.chen_skill3;skill4 =Dota2HeroSkill.chen_skill4;break;
		case R.id.silencer:heroname = "silencer";skill1=Dota2HeroSkill.silencer_skill1;skill2= Dota2HeroSkill.silencer_skill2;skill3 =Dota2HeroSkill.silencer_skill3;skill4 =Dota2HeroSkill.silencer_skill4;break;
		case R.id.ogre_magi:heroname = "ogre_magi";skill1=Dota2HeroSkill.ogre_magi_skill1;skill2= Dota2HeroSkill.ogre_magi_skill2;skill3 =Dota2HeroSkill.ogre_magi_skill3;skill4 =Dota2HeroSkill.ogre_magi_skill4;break;
		case R.id.rubick:heroname = "rubick";skill1=Dota2HeroSkill.rubick_skill1;skill2= Dota2HeroSkill.rubick_skill2;skill3 =Dota2HeroSkill.rubick_skill3;skill4 =Dota2HeroSkill.rubick_skill4;break;
		case R.id.disruptor:heroname = "disruptor";skill1=Dota2HeroSkill.disruptor_skill1;skill2= Dota2HeroSkill.disruptor_skill2;skill3 =Dota2HeroSkill.disruptor_skill3;skill4 =Dota2HeroSkill.disruptor_skill4;break;
		case R.id.keeper_of_the_light:heroname = "keeper_of_the_light";skill1=Dota2HeroSkill.keeper_of_the_light_skill1;skill2= Dota2HeroSkill.keeper_of_the_light_skill2;skill3 =Dota2HeroSkill.keeper_of_the_light_skill3;skill4 =Dota2HeroSkill.keeper_of_the_light_skill4;break;
		case R.id.bane:heroname = "bane";skill1=Dota2HeroSkill.bane_skill1;skill2= Dota2HeroSkill.bane_skill2;skill3 =Dota2HeroSkill.bane_skill3;skill4 =Dota2HeroSkill.bane_skill4;break;
		case R.id.lich:heroname = "lich";skill1=Dota2HeroSkill.lich_skill1;skill2= Dota2HeroSkill.lich_skill2;skill3 =Dota2HeroSkill.lich_skill3;skill4 =Dota2HeroSkill.lich_skill4;break;
		case R.id.lion:heroname = "lion";skill1=Dota2HeroSkill.lion_skill1;skill2= Dota2HeroSkill.lion_skill2;skill3 =Dota2HeroSkill.lion_skill3;skill4 =Dota2HeroSkill.lion_skill4;break;
		case R.id.witch_doctor:heroname = "witch_doctor";skill1=Dota2HeroSkill.witch_doctor_skill1;skill2= Dota2HeroSkill.witch_doctor_skill2;skill3 =Dota2HeroSkill.witch_doctor_skill3;skill4 =Dota2HeroSkill.witch_doctor_skill4;break;
		case R.id.enigma:heroname = "enigma";skill1=Dota2HeroSkill.enigma_skill1;skill2= Dota2HeroSkill.enigma_skill2;skill3 =Dota2HeroSkill.enigma_skill3;skill4 =Dota2HeroSkill.enigma_skill4;break;
		case R.id.necrolyte:heroname = "necrolyte";skill1=Dota2HeroSkill.necrolyte_skill1;skill2= Dota2HeroSkill.necrolyte_skill2;skill3 =Dota2HeroSkill.necrolyte_skill3;skill4 =Dota2HeroSkill.necrolyte_skill4;break;
		case R.id.warlock:heroname = "warlock";skill1=Dota2HeroSkill.warlock_skill1;skill2= Dota2HeroSkill.warlock_skill2;skill3 =Dota2HeroSkill.warlock_skill3;skill4 =Dota2HeroSkill.warlock_skill4;break;
		case R.id.death_prophet:heroname = "death_prophet";skill1=Dota2HeroSkill.death_prophet_skill1;skill2= Dota2HeroSkill.death_prophet_skill2;skill3 =Dota2HeroSkill.death_prophet_skill3;skill4 =Dota2HeroSkill.death_prophet_skill4;break;
		case R.id.pugna:heroname = "pugna";skill1=Dota2HeroSkill.pugna_skill1;skill2= Dota2HeroSkill.pugna_skill2;skill3 =Dota2HeroSkill.pugna_skill3;skill4 =Dota2HeroSkill.pugna_skill4;break;
		case R.id.dazzle:heroname = "dazzle";skill1=Dota2HeroSkill.dazzle_skill1;skill2= Dota2HeroSkill.dazzle_skill2;skill3 =Dota2HeroSkill.dazzle_skill3;skill4 =Dota2HeroSkill.dazzle_skill4;break;
		case R.id.leshrac:heroname = "leshrac";skill1=Dota2HeroSkill.leshrac_skill1;skill2= Dota2HeroSkill.leshrac_skill2;skill3 =Dota2HeroSkill.leshrac_skill3;skill4 =Dota2HeroSkill.leshrac_skill4;break;
		case R.id.dark_seer:heroname = "dark_seer";skill1=Dota2HeroSkill.dark_seer_skill1;skill2= Dota2HeroSkill.dark_seer_skill2;skill3 =Dota2HeroSkill.dark_seer_skill3;skill4 =Dota2HeroSkill.dark_seer_skill4;break;
		case R.id.batrider:heroname = "batrider";skill1=Dota2HeroSkill.batrider_skill1;skill2= Dota2HeroSkill.batrider_skill2;skill3 =Dota2HeroSkill.batrider_skill3;skill4 =Dota2HeroSkill.batrider_skill4;break;
		case R.id.ancient_apparition:heroname = "ancient_apparition";skill1=Dota2HeroSkill.ancient_apparition_skill1;skill2= Dota2HeroSkill.ancient_apparition_skill2;skill3 =Dota2HeroSkill.ancient_apparition_skill3;skill4 =Dota2HeroSkill.ancient_apparition_skill4;break;
		case R.id.invoker:heroname = "invoker";skill1=Dota2HeroSkill.invoker_skill1;skill2= Dota2HeroSkill.invoker_skill2;skill3 =Dota2HeroSkill.invoker_skill3;skill4 =Dota2HeroSkill.invoker_skill4;break;
		case R.id.skywrath_mage:heroname = "skywrath_mage";skill1=Dota2HeroSkill.skywrath_mage_skill1;skill2= Dota2HeroSkill.skywrath_mage_skill2;skill3 =Dota2HeroSkill.skywrath_mage_skill3;skill4 =Dota2HeroSkill.skywrath_mage_skill4;break;
		case R.id.obsidian_destroyer:heroname = "obsidian_destroyer";skill1=Dota2HeroSkill.obsidian_destroyer_skill1;skill2= Dota2HeroSkill.obsidian_destroyer_skill2;skill3 =Dota2HeroSkill.obsidian_destroyer_skill3;skill4 =Dota2HeroSkill.obsidian_destroyer_skill4;break;
		case R.id.shadow_demon:heroname = "shadow_demon";skill1=Dota2HeroSkill.shadow_demon_skill1;skill2= Dota2HeroSkill.shadow_demon_skill2;skill3 =Dota2HeroSkill.shadow_demon_skill3;skill4 =Dota2HeroSkill.shadow_demon_skill4;break;
		case R.id.visage:heroname = "visage";skill1=Dota2HeroSkill.visage_skill1;skill2= Dota2HeroSkill.visage_skill2;skill3 =Dota2HeroSkill.visage_skill3;skill4 =Dota2HeroSkill.visage_skill4;break;
*/
		
		case R.id.earthshaker:heroname = "earthshaker";skill1=Dota2HeroSkill.earthshaker_skill1;skill2= Dota2HeroSkill.earthshaker_skill2;skill3 =Dota2HeroSkill.earthshaker_skill3;skill4 =Dota2HeroSkill.earthshaker_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/earthshaker.mp3";targetDir = Environment.getExternalStorageDirectory() + "/dota2/earthshaker.mp3";break;
		case R.id.sven:heroname = "sven";skill1=Dota2HeroSkill.sven_skill1;skill2= Dota2HeroSkill.sven_skill2;skill3 =Dota2HeroSkill.sven_skill3;skill4 =Dota2HeroSkill.sven_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/sven.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/sven.mp3";break;
		case R.id.tiny:heroname = "tiny";skill1=Dota2HeroSkill.tiny_skill1;skill2= Dota2HeroSkill.tiny_skill2;skill3 =Dota2HeroSkill.tiny_skill3;skill4 =Dota2HeroSkill.tiny_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/tiny.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/tiny.mp3";break;
		case R.id.kunkka:heroname = "kunkka";skill1=Dota2HeroSkill.kunkka_skill1;skill2= Dota2HeroSkill.kunkka_skill2;skill3 =Dota2HeroSkill.kunkka_skill3;skill4 =Dota2HeroSkill.kunkka_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/kunkka.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/kunkka.mp3";break;
		case R.id.beastmaster:heroname = "beastmaster";skill1=Dota2HeroSkill.beastmaster_skill1;skill2= Dota2HeroSkill.beastmaster_skill2;skill3 =Dota2HeroSkill.beastmaster_skill3;skill4 =Dota2HeroSkill.beastmaster_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/beastmaster.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/beastmaster.mp3";break;
		case R.id.dragon_knight:heroname = "dragon_knight";skill1=Dota2HeroSkill.dragon_knight_skill1;skill2= Dota2HeroSkill.dragon_knight_skill2;skill3 =Dota2HeroSkill.dragon_knight_skill3;skill4 =Dota2HeroSkill.dragon_knight_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/dragon_knight.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/dragon_knight.mp3";break;
		case R.id.rattletrap:heroname = "rattletrap";skill1=Dota2HeroSkill.rattletrap_skill1;skill2= Dota2HeroSkill.rattletrap_skill2;skill3 =Dota2HeroSkill.rattletrap_skill3;skill4 =Dota2HeroSkill.rattletrap_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/rattletrap.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/rattletrap.mp3";break;
		case R.id.omniknight:heroname = "omniknight";skill1=Dota2HeroSkill.omniknight_skill1;skill2= Dota2HeroSkill.omniknight_skill2;skill3 =Dota2HeroSkill.omniknight_skill3;skill4 =Dota2HeroSkill.omniknight_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/omniknight.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/omniknight.mp3";break;
		case R.id.huskar:heroname = "huskar";skill1=Dota2HeroSkill.huskar_skill1;skill2= Dota2HeroSkill.huskar_skill2;skill3 =Dota2HeroSkill.huskar_skill3;skill4 =Dota2HeroSkill.huskar_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/huskar.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/huskar.mp3";break;
		case R.id.alchemist:heroname = "alchemist";skill1=Dota2HeroSkill.alchemist_skill1;skill2= Dota2HeroSkill.alchemist_skill2;skill3 =Dota2HeroSkill.alchemist_skill3;skill4 =Dota2HeroSkill.alchemist_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/alchemist.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/alchemist.mp3";break;
		case R.id.brewmaster:heroname = "brewmaster";skill1=Dota2HeroSkill.brewmaster_skill1;skill2= Dota2HeroSkill.brewmaster_skill2;skill3 =Dota2HeroSkill.brewmaster_skill3;skill4 =Dota2HeroSkill.brewmaster_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/brewmaster.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/brewmaster.mp3";break;
		case R.id.treant:heroname = "treant";skill1=Dota2HeroSkill.treant_skill1;skill2= Dota2HeroSkill.treant_skill2;skill3 =Dota2HeroSkill.treant_skill3;skill4 =Dota2HeroSkill.treant_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/treant.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/treant.mp3";break;
		case R.id.wisp:heroname = "wisp";skill1=Dota2HeroSkill.wisp_skill1;skill2= Dota2HeroSkill.wisp_skill2;skill3 =Dota2HeroSkill.wisp_skill3;skill4 =Dota2HeroSkill.wisp_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/wisp.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/wisp.mp3";break;
		case R.id.centaur:heroname = "centaur";skill1=Dota2HeroSkill.centaur_skill1;skill2= Dota2HeroSkill.centaur_skill2;skill3 =Dota2HeroSkill.centaur_skill3;skill4 =Dota2HeroSkill.centaur_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/centaur.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/centaur.mp3";break;
		case R.id.axe:heroname = "axe";skill1=Dota2HeroSkill.axe_skill1;skill2= Dota2HeroSkill.axe_skill2;skill3 =Dota2HeroSkill.axe_skill3;skill4 =Dota2HeroSkill.axe_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/axe.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/axe.mp3";break;
		case R.id.pudge:heroname = "pudge";skill1=Dota2HeroSkill.pudge_skill1;skill2= Dota2HeroSkill.pudge_skill2;skill3 =Dota2HeroSkill.pudge_skill3;skill4 =Dota2HeroSkill.pudge_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/pudge.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/pudge.mp3";break;
		case R.id.sand_king:heroname = "sand_king";skill1=Dota2HeroSkill.sand_king_skill1;skill2= Dota2HeroSkill.sand_king_skill2;skill3 =Dota2HeroSkill.sand_king_skill3;skill4 =Dota2HeroSkill.sand_king_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/sand_king.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/sand_king.mp3";break;
		case R.id.slardar:heroname = "slardar";skill1=Dota2HeroSkill.slardar_skill1;skill2= Dota2HeroSkill.slardar_skill2;skill3 =Dota2HeroSkill.slardar_skill3;skill4 =Dota2HeroSkill.slardar_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/slardar.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/slardar.mp3";break;
		case R.id.tidehunter:heroname = "tidehunter";skill1=Dota2HeroSkill.tidehunter_skill1;skill2= Dota2HeroSkill.tidehunter_skill2;skill3 =Dota2HeroSkill.tidehunter_skill3;skill4 =Dota2HeroSkill.tidehunter_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/tidehunter.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/tidehunter.mp3";break;
		case R.id.skeleton_king:heroname = "skeleton_king";skill1=Dota2HeroSkill.skeleton_king_skill1;skill2= Dota2HeroSkill.skeleton_king_skill2;skill3 =Dota2HeroSkill.skeleton_king_skill3;skill4 =Dota2HeroSkill.skeleton_king_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/skeleton_king.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/skeleton_king.mp3";break;
		case R.id.life_stealer:heroname = "life_stealer";skill1=Dota2HeroSkill.life_stealer_skill1;skill2= Dota2HeroSkill.life_stealer_skill2;skill3 =Dota2HeroSkill.life_stealer_skill3;skill4 =Dota2HeroSkill.life_stealer_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/life_stealer.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/life_stealer.mp3";break;
		case R.id.night_stalker:heroname = "night_stalker";skill1=Dota2HeroSkill.night_stalker_skill1;skill2= Dota2HeroSkill.night_stalker_skill2;skill3 =Dota2HeroSkill.night_stalker_skill3;skill4 =Dota2HeroSkill.night_stalker_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/night_stalker.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/night_stalker.mp3";break;
		case R.id.doom_bringer:heroname = "doom_bringer";skill1=Dota2HeroSkill.doom_bringer_skill1;skill2= Dota2HeroSkill.doom_bringer_skill2;skill3 =Dota2HeroSkill.doom_bringer_skill3;skill4 =Dota2HeroSkill.doom_bringer_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/doom_bringer.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/doom_bringer.mp3";break;
		case R.id.spirit_breaker:heroname = "spirit_breaker";skill1=Dota2HeroSkill.spirit_breaker_skill1;skill2= Dota2HeroSkill.spirit_breaker_skill2;skill3 =Dota2HeroSkill.spirit_breaker_skill3;skill4 =Dota2HeroSkill.spirit_breaker_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/spirit_breaker.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/spirit_breaker.mp3";break;
		case R.id.lycan:heroname = "lycan";skill1=Dota2HeroSkill.lycan_skill1;skill2= Dota2HeroSkill.lycan_skill2;skill3 =Dota2HeroSkill.lycan_skill3;skill4 =Dota2HeroSkill.lycan_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/lycan.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/lycan.mp3";break;
		case R.id.chaos_knight:heroname = "chaos_knight";skill1=Dota2HeroSkill.chaos_knight_skill1;skill2= Dota2HeroSkill.chaos_knight_skill2;skill3 =Dota2HeroSkill.chaos_knight_skill3;skill4 =Dota2HeroSkill.chaos_knight_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/chaos_knight.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/chaos_knight.mp3";break;
		case R.id.undying:heroname = "undying";skill1=Dota2HeroSkill.undying_skill1;skill2= Dota2HeroSkill.undying_skill2;skill3 =Dota2HeroSkill.undying_skill3;skill4 =Dota2HeroSkill.undying_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/undying.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/undying.mp3";break;
		case R.id.shredder:heroname = "shredder";skill1=Dota2HeroSkill.shredder_skill1;skill2= Dota2HeroSkill.shredder_skill2;skill3 =Dota2HeroSkill.shredder_skill3;skill4 =Dota2HeroSkill.shredder_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/shredder.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/shredder.mp3";break;
		case R.id.bristleback:heroname = "bristleback";skill1=Dota2HeroSkill.bristleback_skill1;skill2= Dota2HeroSkill.bristleback_skill2;skill3 =Dota2HeroSkill.bristleback_skill3;skill4 =Dota2HeroSkill.bristleback_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/bristleback.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/bristleback.mp3";break;
		case R.id.tusk:heroname = "tusk";skill1=Dota2HeroSkill.tusk_skill1;skill2= Dota2HeroSkill.tusk_skill2;skill3 =Dota2HeroSkill.tusk_skill3;skill4 =Dota2HeroSkill.tusk_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/tusk.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/tusk.mp3";break;
		case R.id.elder_titan:heroname = "elder_titan";skill1=Dota2HeroSkill.elder_titan_skill1;skill2= Dota2HeroSkill.elder_titan_skill2;skill3 =Dota2HeroSkill.elder_titan_skill3;skill4 =Dota2HeroSkill.elder_titan_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/elder_titan.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/elder_titan.mp3";break;
		case R.id.earth_spirit:heroname = "earth_spirit";skill1=Dota2HeroSkill.earth_spirit_skill1;skill2= Dota2HeroSkill.earth_spirit_skill2;skill3 =Dota2HeroSkill.earth_spirit_skill3;skill4 =Dota2HeroSkill.earth_spirit_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/earth_spirit.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/earth_spirit.mp3";break;
		case R.id.magnataur:heroname = "magnataur";skill1=Dota2HeroSkill.magnataur_skill1;skill2= Dota2HeroSkill.magnataur_skill2;skill3 =Dota2HeroSkill.magnataur_skill3;skill4 =Dota2HeroSkill.magnataur_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/magnataur.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/magnataur.mp3";break;
		case R.id.abaddon:heroname = "abaddon";skill1=Dota2HeroSkill.abaddon_skill1;skill2= Dota2HeroSkill.abaddon_skill2;skill3 =Dota2HeroSkill.abaddon_skill3;skill4 =Dota2HeroSkill.abaddon_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/abaddon.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/abaddon.mp3";break;
		case R.id.legion:heroname = "legion";skill1=Dota2HeroSkill.legion_skill1;skill2= Dota2HeroSkill.legion_skill2;skill3 =Dota2HeroSkill.legion_skill3;skill4 =Dota2HeroSkill.legion_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/legion.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/legion.mp3";break;
		case R.id.phoenix_full:heroname = "phoenix_full";skill1=Dota2HeroSkill.phoenix_full_skill1;skill2= Dota2HeroSkill.phoenix_full_skill2;skill3 =Dota2HeroSkill.phoenix_full_skill3;skill4 =Dota2HeroSkill.phoenix_full_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/phoenix_full.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/phoenix_full.mp3";break;
		//------Agile----------------------------------
		case R.id.antimage:heroname = "antimage";skill1=Dota2HeroSkill.antimage_skill1;skill2= Dota2HeroSkill.antimage_skill2;skill3 =Dota2HeroSkill.antimage_skill3;skill4 =Dota2HeroSkill.antimage_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/antimage.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/antimage.mp3";break;
		case R.id.drow_ranger:heroname = "drow_ranger";skill1=Dota2HeroSkill.drow_ranger_skill1;skill2= Dota2HeroSkill.drow_ranger_skill2;skill3 =Dota2HeroSkill.drow_ranger_skill3;skill4 =Dota2HeroSkill.drow_ranger_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/drow_ranger.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/drow_ranger.mp3";break;
		case R.id.juggernaut:heroname = "juggernaut";skill1=Dota2HeroSkill.juggernaut_skill1;skill2= Dota2HeroSkill.juggernaut_skill2;skill3 =Dota2HeroSkill.juggernaut_skill3;skill4 =Dota2HeroSkill.juggernaut_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/juggernaut.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/juggernaut.mp3";break;
		case R.id.mirana:heroname = "mirana";skill1=Dota2HeroSkill.mirana_skill1;skill2= Dota2HeroSkill.mirana_skill2;skill3 =Dota2HeroSkill.mirana_skill3;skill4 =Dota2HeroSkill.mirana_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/mirana.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/mirana.mp3";break;
		case R.id.morphling:heroname = "morphling";skill1=Dota2HeroSkill.morphling_skill1;skill2= Dota2HeroSkill.morphling_skill2;skill3 =Dota2HeroSkill.morphling_skill3;skill4 =Dota2HeroSkill.morphling_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/morphling.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/morphling.mp3";break;
		case R.id.phantom_lancer:heroname = "phantom_lancer";skill1=Dota2HeroSkill.phantom_lancer_skill1;skill2= Dota2HeroSkill.phantom_lancer_skill2;skill3 =Dota2HeroSkill.phantom_lancer_skill3;skill4 =Dota2HeroSkill.phantom_lancer_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/phantom_lancer.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/phantom_lancer.mp3";break;
		case R.id.vengefulspirit:heroname = "vengefulspirit";skill1=Dota2HeroSkill.vengefulspirit_skill1;skill2= Dota2HeroSkill.vengefulspirit_skill2;skill3 =Dota2HeroSkill.vengefulspirit_skill3;skill4 =Dota2HeroSkill.vengefulspirit_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/vengefulspirit.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/vengefulspirit.mp3";break;
		case R.id.riki:heroname = "riki";skill1=Dota2HeroSkill.riki_skill1;skill2= Dota2HeroSkill.riki_skill2;skill3 =Dota2HeroSkill.riki_skill3;skill4 =Dota2HeroSkill.riki_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/riki.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/riki.mp3";break;
		case R.id.sniper:heroname = "sniper";skill1=Dota2HeroSkill.sniper_skill1;skill2= Dota2HeroSkill.sniper_skill2;skill3 =Dota2HeroSkill.sniper_skill3;skill4 =Dota2HeroSkill.sniper_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/sniper.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/sniper.mp3";break;
		case R.id.templar_assassin:heroname = "templar_assassin";skill1=Dota2HeroSkill.templar_assassin_skill1;skill2= Dota2HeroSkill.templar_assassin_skill2;skill3 =Dota2HeroSkill.templar_assassin_skill3;skill4 =Dota2HeroSkill.templar_assassin_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/templar_assassin.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/templar_assassin.mp3";break;
		case R.id.luna:heroname = "luna";skill1=Dota2HeroSkill.luna_skill1;skill2= Dota2HeroSkill.luna_skill2;skill3 =Dota2HeroSkill.luna_skill3;skill4 =Dota2HeroSkill.luna_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/luna.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/luna.mp3";break;
		case R.id.bounty_hunter:heroname = "bounty_hunter";skill1=Dota2HeroSkill.bounty_hunter_skill1;skill2= Dota2HeroSkill.bounty_hunter_skill2;skill3 =Dota2HeroSkill.bounty_hunter_skill3;skill4 =Dota2HeroSkill.bounty_hunter_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/bounty_hunter.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/bounty_hunter.mp3";break;
		case R.id.ursa:heroname = "ursa";skill1=Dota2HeroSkill.ursa_skill1;skill2= Dota2HeroSkill.ursa_skill2;skill3 =Dota2HeroSkill.ursa_skill3;skill4 =Dota2HeroSkill.ursa_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/ursa.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/ursa.mp3";break;
		case R.id.gyrocopter:heroname = "gyrocopter";skill1=Dota2HeroSkill.gyrocopter_skill1;skill2= Dota2HeroSkill.gyrocopter_skill2;skill3 =Dota2HeroSkill.gyrocopter_skill3;skill4 =Dota2HeroSkill.gyrocopter_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/gyrocopter.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/gyrocopter.mp3";break;
		case R.id.lone_druid:heroname = "lone_druid";skill1=Dota2HeroSkill.lone_druid_skill1;skill2= Dota2HeroSkill.lone_druid_skill2;skill3 =Dota2HeroSkill.lone_druid_skill3;skill4 =Dota2HeroSkill.lone_druid_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/lone_druid.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/lone_druid.mp3";break;
		case R.id.naga_siren:heroname = "naga_siren";skill1=Dota2HeroSkill.naga_siren_skill1;skill2= Dota2HeroSkill.naga_siren_skill2;skill3 =Dota2HeroSkill.naga_siren_skill3;skill4 =Dota2HeroSkill.naga_siren_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/naga_siren.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/naga_siren.mp3";break;
		case R.id.bloodseeker:heroname = "bloodseeker";skill1=Dota2HeroSkill.bloodseeker_skill1;skill2= Dota2HeroSkill.bloodseeker_skill2;skill3 =Dota2HeroSkill.bloodseeker_skill3;skill4 =Dota2HeroSkill.bloodseeker_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/bloodseeker.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/bloodseeker.mp3";break;
		case R.id.nevermore:heroname = "nevermore";skill1=Dota2HeroSkill.nevermore_skill1;skill2= Dota2HeroSkill.nevermore_skill2;skill3 =Dota2HeroSkill.nevermore_skill3;skill4 =Dota2HeroSkill.nevermore_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/nevermore.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/nevermore.mp3";break;
		case R.id.razor:heroname = "razor";skill1=Dota2HeroSkill.razor_skill1;skill2= Dota2HeroSkill.razor_skill2;skill3 =Dota2HeroSkill.razor_skill3;skill4 =Dota2HeroSkill.razor_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/razor.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/razor.mp3";break;
		case R.id.venomancer:heroname = "venomancer";skill1=Dota2HeroSkill.venomancer_skill1;skill2= Dota2HeroSkill.venomancer_skill2;skill3 =Dota2HeroSkill.venomancer_skill3;skill4 =Dota2HeroSkill.venomancer_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/venomancer.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/venomancer.mp3";break;
		case R.id.faceless_void:heroname = "faceless_void";skill1=Dota2HeroSkill.faceless_void_skill1;skill2= Dota2HeroSkill.faceless_void_skill2;skill3 =Dota2HeroSkill.faceless_void_skill3;skill4 =Dota2HeroSkill.faceless_void_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/faceless_void.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/faceless_void.mp3";break;
		case R.id.phantom_assassin:heroname = "phantom_assassin";skill1=Dota2HeroSkill.phantom_assassin_skill1;skill2= Dota2HeroSkill.phantom_assassin_skill2;skill3 =Dota2HeroSkill.phantom_assassin_skill3;skill4 =Dota2HeroSkill.phantom_assassin_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/phantom_assassin.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/phantom_assassin.mp3";break;
		case R.id.viper:heroname = "viper";skill1=Dota2HeroSkill.viper_skill1;skill2= Dota2HeroSkill.viper_skill2;skill3 =Dota2HeroSkill.viper_skill3;skill4 =Dota2HeroSkill.viper_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/viper.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/viper.mp3";break;
		case R.id.clinkz:heroname = "clinkz";skill1=Dota2HeroSkill.clinkz_skill1;skill2= Dota2HeroSkill.clinkz_skill2;skill3 =Dota2HeroSkill.clinkz_skill3;skill4 =Dota2HeroSkill.clinkz_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/clinkz.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/clinkz.mp3";break;
		case R.id.broodmother:heroname = "broodmother";skill1=Dota2HeroSkill.broodmother_skill1;skill2= Dota2HeroSkill.broodmother_skill2;skill3 =Dota2HeroSkill.broodmother_skill3;skill4 =Dota2HeroSkill.broodmother_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/broodmother.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/broodmother.mp3";break;
		case R.id.weaver:heroname = "weaver";skill1=Dota2HeroSkill.weaver_skill1;skill2= Dota2HeroSkill.weaver_skill2;skill3 =Dota2HeroSkill.weaver_skill3;skill4 =Dota2HeroSkill.weaver_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/weaver.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/weaver.mp3";break;
		case R.id.spectre:heroname = "spectre";skill1=Dota2HeroSkill.spectre_skill1;skill2= Dota2HeroSkill.spectre_skill2;skill3 =Dota2HeroSkill.spectre_skill3;skill4 =Dota2HeroSkill.spectre_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/spectre.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/spectre.mp3";break;
		case R.id.troll_warlord:heroname = "troll_warlord";skill1=Dota2HeroSkill.troll_warlord_skill1;skill2= Dota2HeroSkill.troll_warlord_skill2;skill3 =Dota2HeroSkill.troll_warlord_skill3;skill4 =Dota2HeroSkill.troll_warlord_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/troll_warlord.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/troll_warlord.mp3";break;
		case R.id.meepo:heroname = "meepo";skill1=Dota2HeroSkill.meepo_skill1;skill2= Dota2HeroSkill.meepo_skill2;skill3 =Dota2HeroSkill.meepo_skill3;skill4 =Dota2HeroSkill.meepo_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/meepo.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/meepo.mp3";break;
		case R.id.nyx_assassin:heroname = "nyx_assassin";skill1=Dota2HeroSkill.nyx_assassin_skill1;skill2= Dota2HeroSkill.nyx_assassin_skill2;skill3 =Dota2HeroSkill.nyx_assassin_skill3;skill4 =Dota2HeroSkill.nyx_assassin_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/nyx_assassin.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/nyx_assassin.mp3";break;
		case R.id.slark:heroname = "slark";skill1=Dota2HeroSkill.slark_skill1;skill2= Dota2HeroSkill.slark_skill2;skill3 =Dota2HeroSkill.slark_skill3;skill4 =Dota2HeroSkill.slark_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/slark.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/slark.mp3";break;
		case R.id.medusa:heroname = "medusa";skill1=Dota2HeroSkill.medusa_skill1;skill2= Dota2HeroSkill.medusa_skill2;skill3 =Dota2HeroSkill.medusa_skill3;skill4 =Dota2HeroSkill.medusa_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/medusa.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/medusa.mp3";break;
		case R.id.ember_spirit:heroname = "ember_spirit";skill1=Dota2HeroSkill.ember_spirit_skill1;skill2= Dota2HeroSkill.ember_spirit_skill2;skill3 =Dota2HeroSkill.ember_spirit_skill3;skill4 =Dota2HeroSkill.ember_spirit_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/ember_spirit.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/ember_spirit.mp3";break;
		case R.id.terrorblade:heroname = "terrorblade";skill1=Dota2HeroSkill.terrorblade_skill1;skill2= Dota2HeroSkill.terrorblade_skill2;skill3 =Dota2HeroSkill.terrorblade_skill3;skill4 =Dota2HeroSkill.terrorblade_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/terrorblade.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/terrorblade.mp3";break;
		//------Intelgence----------------------------------
		case R.id.crystal_maiden:heroname = "crystal_maiden";skill1=Dota2HeroSkill.crystal_maiden_skill1;skill2= Dota2HeroSkill.crystal_maiden_skill2;skill3 =Dota2HeroSkill.crystal_maiden_skill3;skill4 =Dota2HeroSkill.crystal_maiden_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/crystal_maiden.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/crystal_maiden.mp3";break;
		case R.id.puck:heroname = "puck";skill1=Dota2HeroSkill.puck_skill1;skill2= Dota2HeroSkill.puck_skill2;skill3 =Dota2HeroSkill.puck_skill3;skill4 =Dota2HeroSkill.puck_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/puck.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/puck.mp3";break;
		case R.id.storm_spirit:heroname = "storm_spirit";skill1=Dota2HeroSkill.storm_spirit_skill1;skill2= Dota2HeroSkill.storm_spirit_skill2;skill3 =Dota2HeroSkill.storm_spirit_skill3;skill4 =Dota2HeroSkill.storm_spirit_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/storm_spirit.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/storm_spirit.mp3";break;
		case R.id.windrunner:heroname = "windrunner";skill1=Dota2HeroSkill.windrunner_skill1;skill2= Dota2HeroSkill.windrunner_skill2;skill3 =Dota2HeroSkill.windrunner_skill3;skill4 =Dota2HeroSkill.windrunner_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/windrunner.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/windrunner.mp3";break;
		case R.id.zuus:heroname = "zuus";skill1=Dota2HeroSkill.zuus_skill1;skill2= Dota2HeroSkill.zuus_skill2;skill3 =Dota2HeroSkill.zuus_skill3;skill4 =Dota2HeroSkill.zuus_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/zuus.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/zuus.mp3";break;
		case R.id.lina:heroname = "lina";skill1=Dota2HeroSkill.lina_skill1;skill2= Dota2HeroSkill.lina_skill2;skill3 =Dota2HeroSkill.lina_skill3;skill4 =Dota2HeroSkill.lina_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/lina.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/lina.mp3";break;
		case R.id.shadow_shaman:heroname = "shadow_shaman";skill1=Dota2HeroSkill.shadow_shaman_skill1;skill2= Dota2HeroSkill.shadow_shaman_skill2;skill3 =Dota2HeroSkill.shadow_shaman_skill3;skill4 =Dota2HeroSkill.shadow_shaman_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/shadow_shaman.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/shadow_shaman.mp3";break;
		case R.id.tinker:heroname = "tinker";skill1=Dota2HeroSkill.tinker_skill1;skill2= Dota2HeroSkill.tinker_skill2;skill3 =Dota2HeroSkill.tinker_skill3;skill4 =Dota2HeroSkill.tinker_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/tinker.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/tinker.mp3";break;
		case R.id.furion:heroname = "furion";skill1=Dota2HeroSkill.furion_skill1;skill2= Dota2HeroSkill.furion_skill2;skill3 =Dota2HeroSkill.furion_skill3;skill4 =Dota2HeroSkill.furion_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/furion.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/furion.mp3";break;
		case R.id.enchantress:heroname = "enchantress";skill1=Dota2HeroSkill.enchantress_skill1;skill2= Dota2HeroSkill.enchantress_skill2;skill3 =Dota2HeroSkill.enchantress_skill3;skill4 =Dota2HeroSkill.enchantress_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/enchantress.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/enchantress.mp3";break;
		case R.id.jakiro:heroname = "jakiro";skill1=Dota2HeroSkill.jakiro_skill1;skill2= Dota2HeroSkill.jakiro_skill2;skill3 =Dota2HeroSkill.jakiro_skill3;skill4 =Dota2HeroSkill.jakiro_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/jakiro.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/jakiro.mp3";break;
		case R.id.chen:heroname = "chen";skill1=Dota2HeroSkill.chen_skill1;skill2= Dota2HeroSkill.chen_skill2;skill3 =Dota2HeroSkill.chen_skill3;skill4 =Dota2HeroSkill.chen_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/chen.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/chen.mp3";break;
		case R.id.silencer:heroname = "silencer";skill1=Dota2HeroSkill.silencer_skill1;skill2= Dota2HeroSkill.silencer_skill2;skill3 =Dota2HeroSkill.silencer_skill3;skill4 =Dota2HeroSkill.silencer_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/silencer.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/silencer.mp3";break;
		case R.id.ogre_magi:heroname = "ogre_magi";skill1=Dota2HeroSkill.ogre_magi_skill1;skill2= Dota2HeroSkill.ogre_magi_skill2;skill3 =Dota2HeroSkill.ogre_magi_skill3;skill4 =Dota2HeroSkill.ogre_magi_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/ogre_magi.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/ogre_magi.mp3";break;
		case R.id.rubick:heroname = "rubick";skill1=Dota2HeroSkill.rubick_skill1;skill2= Dota2HeroSkill.rubick_skill2;skill3 =Dota2HeroSkill.rubick_skill3;skill4 =Dota2HeroSkill.rubick_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/rubick.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/rubick.mp3";break;
		case R.id.disruptor:heroname = "disruptor";skill1=Dota2HeroSkill.disruptor_skill1;skill2= Dota2HeroSkill.disruptor_skill2;skill3 =Dota2HeroSkill.disruptor_skill3;skill4 =Dota2HeroSkill.disruptor_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/disruptor.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/disruptor.mp3";break;
		case R.id.keeper_of_the_light:heroname = "keeper_of_the_light";skill1=Dota2HeroSkill.keeper_of_the_light_skill1;skill2= Dota2HeroSkill.keeper_of_the_light_skill2;skill3 =Dota2HeroSkill.keeper_of_the_light_skill3;skill4 =Dota2HeroSkill.keeper_of_the_light_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/keeper_of_the_light.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/keeper_of_the_light.mp3";break;
		case R.id.bane:heroname = "bane";skill1=Dota2HeroSkill.bane_skill1;skill2= Dota2HeroSkill.bane_skill2;skill3 =Dota2HeroSkill.bane_skill3;skill4 =Dota2HeroSkill.bane_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/bane.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/bane.mp3";break;
		case R.id.lich:heroname = "lich";skill1=Dota2HeroSkill.lich_skill1;skill2= Dota2HeroSkill.lich_skill2;skill3 =Dota2HeroSkill.lich_skill3;skill4 =Dota2HeroSkill.lich_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/lich.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/lich.mp3";break;
		case R.id.lion:heroname = "lion";skill1=Dota2HeroSkill.lion_skill1;skill2= Dota2HeroSkill.lion_skill2;skill3 =Dota2HeroSkill.lion_skill3;skill4 =Dota2HeroSkill.lion_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/lion.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/lion.mp3";break;
		case R.id.witch_doctor:heroname = "witch_doctor";skill1=Dota2HeroSkill.witch_doctor_skill1;skill2= Dota2HeroSkill.witch_doctor_skill2;skill3 =Dota2HeroSkill.witch_doctor_skill3;skill4 =Dota2HeroSkill.witch_doctor_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/witch_doctor.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/witch_doctor.mp3";break;
		case R.id.enigma:heroname = "enigma";skill1=Dota2HeroSkill.enigma_skill1;skill2= Dota2HeroSkill.enigma_skill2;skill3 =Dota2HeroSkill.enigma_skill3;skill4 =Dota2HeroSkill.enigma_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/enigma.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/enigma.mp3";break;
		case R.id.necrolyte:heroname = "necrolyte";skill1=Dota2HeroSkill.necrolyte_skill1;skill2= Dota2HeroSkill.necrolyte_skill2;skill3 =Dota2HeroSkill.necrolyte_skill3;skill4 =Dota2HeroSkill.necrolyte_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/necrolyte.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/necrolyte.mp3";break;
		case R.id.warlock:heroname = "warlock";skill1=Dota2HeroSkill.warlock_skill1;skill2= Dota2HeroSkill.warlock_skill2;skill3 =Dota2HeroSkill.warlock_skill3;skill4 =Dota2HeroSkill.warlock_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/warlock.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/warlock.mp3";break;
		case R.id.death_prophet:heroname = "death_prophet";skill1=Dota2HeroSkill.death_prophet_skill1;skill2= Dota2HeroSkill.death_prophet_skill2;skill3 =Dota2HeroSkill.death_prophet_skill3;skill4 =Dota2HeroSkill.death_prophet_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/death_prophet.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/death_prophet.mp3";break;
		case R.id.pugna:heroname = "pugna";skill1=Dota2HeroSkill.pugna_skill1;skill2= Dota2HeroSkill.pugna_skill2;skill3 =Dota2HeroSkill.pugna_skill3;skill4 =Dota2HeroSkill.pugna_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/pugna.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/pugna.mp3";break;
		case R.id.dazzle:heroname = "dazzle";skill1=Dota2HeroSkill.dazzle_skill1;skill2= Dota2HeroSkill.dazzle_skill2;skill3 =Dota2HeroSkill.dazzle_skill3;skill4 =Dota2HeroSkill.dazzle_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/dazzle.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/dazzle.mp3";break;
		case R.id.leshrac:heroname = "leshrac";skill1=Dota2HeroSkill.leshrac_skill1;skill2= Dota2HeroSkill.leshrac_skill2;skill3 =Dota2HeroSkill.leshrac_skill3;skill4 =Dota2HeroSkill.leshrac_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/leshrac.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/leshrac.mp3";break;
		case R.id.dark_seer:heroname = "dark_seer";skill1=Dota2HeroSkill.dark_seer_skill1;skill2= Dota2HeroSkill.dark_seer_skill2;skill3 =Dota2HeroSkill.dark_seer_skill3;skill4 =Dota2HeroSkill.dark_seer_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/dark_seer.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/dark_seer.mp3";break;
		case R.id.batrider:heroname = "batrider";skill1=Dota2HeroSkill.batrider_skill1;skill2= Dota2HeroSkill.batrider_skill2;skill3 =Dota2HeroSkill.batrider_skill3;skill4 =Dota2HeroSkill.batrider_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/batrider.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/batrider.mp3";break;
		case R.id.ancient_apparition:heroname = "ancient_apparition";skill1=Dota2HeroSkill.ancient_apparition_skill1;skill2= Dota2HeroSkill.ancient_apparition_skill2;skill3 =Dota2HeroSkill.ancient_apparition_skill3;skill4 =Dota2HeroSkill.ancient_apparition_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/ancient_apparition.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/ancient_apparition.mp3";break;
		case R.id.invoker:heroname = "invoker";skill1=Dota2HeroSkill.invoker_skill1;skill2= Dota2HeroSkill.invoker_skill2;skill3 =Dota2HeroSkill.invoker_skill3;skill4 =Dota2HeroSkill.invoker_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/invoker.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/invoker.mp3";break;
		case R.id.skywrath_mage:heroname = "skywrath_mage";skill1=Dota2HeroSkill.skywrath_mage_skill1;skill2= Dota2HeroSkill.skywrath_mage_skill2;skill3 =Dota2HeroSkill.skywrath_mage_skill3;skill4 =Dota2HeroSkill.skywrath_mage_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/skywrath_mage.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/skywrath_mage.mp3";break;
		case R.id.obsidian_destroyer:heroname = "obsidian_destroyer";skill1=Dota2HeroSkill.obsidian_destroyer_skill1;skill2= Dota2HeroSkill.obsidian_destroyer_skill2;skill3 =Dota2HeroSkill.obsidian_destroyer_skill3;skill4 =Dota2HeroSkill.obsidian_destroyer_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/obsidian_destroyer.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/obsidian_destroyer.mp3";break;
		case R.id.shadow_demon:heroname = "shadow_demon";skill1=Dota2HeroSkill.shadow_demon_skill1;skill2= Dota2HeroSkill.shadow_demon_skill2;skill3 =Dota2HeroSkill.shadow_demon_skill3;skill4 =Dota2HeroSkill.shadow_demon_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/shadow_demon.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/shadow_demon.mp3";break;
		case R.id.visage:heroname = "visage";skill1=Dota2HeroSkill.visage_skill1;skill2= Dota2HeroSkill.visage_skill2;skill3 =Dota2HeroSkill.visage_skill3;skill4 =Dota2HeroSkill.visage_skill4;url = "http://112.124.104.210:8080/gameforum/music/dota2/visage.mp3";targetDir = Environment.getExternalStorageDirectory().getName() + "/dota2/visage.mp3";break;

        default:heroname = "earthshaker";skill1=Dota2HeroSkill.earthshaker_skill1;skill2= Dota2HeroSkill.earthshaker_skill2;skill3 =Dota2HeroSkill.earthshaker_skill3;skill4 =Dota2HeroSkill.earthshaker_skill4;break;

		}
		

				if (Environment.getExternalStorageState().equals(
						Environment.MEDIA_MOUNTED)) {
					if (new File(targetDir).exists()) {// 如果文件存在，直接播放
						play(targetDir);

					} else {// 否则下载后再播放
						dota2DownloadMusic(url, targetDir);
					}

				} else {
					Toast.makeText(getApplicationContext(), "sdcard不可用", 0).show();
				}
		
		
		bundle.putString("heroname", heroname);
		
		bundle.putString("skill1", skill1);
		bundle.putString("skill2", skill2);
		bundle.putString("skill3", skill3);
		bundle.putString("skill4", skill4);
		intent.putExtras(bundle);
		startActivityForResult(intent, 0);
	}

	boolean[] mark = { true, true, true, true, true, true, true, true, true,
			true, true, true };

	public void handlerDisplay(View target) {

		switch (target.getId()) {
		case R.id.tianhuiBtn:
		case R.id.tianhuiRelativeLayout:
			doAction(R.id.tianhuiBtn, R.id.tianhuiDisplay, 0);
			break;
		case R.id.yieyanBtn:
		case R.id.yieyanRelativeLayout:
			doAction(R.id.yieyanBtn, R.id.yieyanDisplay, 1);
			break;
		case R.id.tianhuiAgileBtn:
		case R.id.tianhuiAgileRelativeLayout:
			doAction(R.id.tianhuiAgileBtn, R.id.tianhuiAgileDisplay, 2);
			break;
		case R.id.yieyanAgileBtn:
		case R.id.yieyanAgileRelativeLayout:
			doAction(R.id.yieyanAgileBtn, R.id.yieyanAgileDisplay, 3);
			break;
		case R.id.tianhuiIntelgenceBtn:
		case R.id.tianhuiIntelgenceRelativeLayout:
			doAction(R.id.tianhuiIntelgenceBtn, R.id.tianhuiIntelgenceDisplay,
					4);
			break;
		case R.id.yieyanIntelgenceBtn:
		case R.id.yieyanIntelgenceRelativeLayout:
			doAction(R.id.yieyanIntelgenceBtn, R.id.yieyanIntelgenceDisplay, 5);
			break;
		}

	}

	public void doAction(int btn, int display, int index) {
		Drawable up = getResources().getDrawable(R.drawable.ud_switch_u_btn_n);
		Drawable down = getResources()
				.getDrawable(R.drawable.ud_switch_d_btn_n);
		Button button = (Button) this.findViewById(btn);
		LinearLayout ll = (LinearLayout) this.findViewById(display);

		if (mark[index]) {
			button.setBackgroundDrawable(down);
			ll.setVisibility(View.GONE);

		} else {
			button.setBackgroundDrawable(up);
			ll.setVisibility(View.VISIBLE);
		}
		mark[index] = !mark[index];

	}
	/**
	 * 从服务器下载音乐
	 * @param url	服务器资源的地址
	 * @param target 存储在本地的位置
	 */
	public void dota2DownloadMusic(String url, final String target) {
		
		FinalHttp finalHttp = new FinalHttp();
		finalHttp.download(url, target, new AjaxCallBack<File>() {

			@Override
			public void onFailure(Throwable t, int errorNo, String strMsg) {
				super.onFailure(t, errorNo, strMsg);
				//当服务器缺少此英雄的声音文件时也会弹出此提示
				Toast.makeText(getApplicationContext(), "下载失败，可能网络出现问题了哦",
						Toast.LENGTH_SHORT).show();
			}

			@Override
			public void onLoading(long count, long current) {
	
				super.onLoading(count, current);
			}

			@Override
			public void onSuccess(File t) {
				super.onSuccess(t);
				play(target);
			}
		});
	}
	/**
	 * 播放音乐
	 * @param path 音乐文件在本地存储的路径
	 */
	public void play(String path) {
		MediaPlayer mp = new MediaPlayer();
		try {
			mp.setDataSource(path);
			mp.prepare();
			mp.start();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}